3.8.96 \(\int x^2 (-a-b x)^{-n} (a+b x)^n \, dx\)

Optimal. Leaf size=26 \[ \frac {1}{3} x^3 (-a-b x)^{-n} (a+b x)^n \]

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {23, 30} \begin {gather*} \frac {1}{3} x^3 (-a-b x)^{-n} (a+b x)^n \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^2*(a + b*x)^n)/(-a - b*x)^n,x]

[Out]

(x^3*(a + b*x)^n)/(3*(-a - b*x)^n)

Rule 23

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((c_) + (d_.)*(v_))^(n_), x_Symbol] :> Dist[(a + b*v)^m/(c + d*v)^m, Int[u*
(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] &&  !(IntegerQ[m] || IntegerQ[n
] || GtQ[b/d, 0])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin {align*} \int x^2 (-a-b x)^{-n} (a+b x)^n \, dx &=\left ((-a-b x)^{-n} (a+b x)^n\right ) \int x^2 \, dx\\ &=\frac {1}{3} x^3 (-a-b x)^{-n} (a+b x)^n\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 26, normalized size = 1.00 \begin {gather*} \frac {1}{3} x^3 (-a-b x)^{-n} (a+b x)^n \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(a + b*x)^n)/(-a - b*x)^n,x]

[Out]

(x^3*(a + b*x)^n)/(3*(-a - b*x)^n)

________________________________________________________________________________________

IntegrateAlgebraic [B]  time = 0.07, size = 55, normalized size = 2.12 \begin {gather*} -\frac {\left (3 a^2+3 a (-a-b x)+(-a-b x)^2\right ) (-a-b x)^{1-n} (a+b x)^n}{3 b^3} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(x^2*(a + b*x)^n)/(-a - b*x)^n,x]

[Out]

-1/3*((-a - b*x)^(1 - n)*(a + b*x)^n*(3*a^2 + 3*a*(-a - b*x) + (-a - b*x)^2))/b^3

________________________________________________________________________________________

fricas [A]  time = 1.74, size = 9, normalized size = 0.35 \begin {gather*} \frac {1}{3} \, x^{3} \cos \left (\pi n\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(b*x+a)^n/((-b*x-a)^n),x, algorithm="fricas")

[Out]

1/3*x^3*cos(pi*n)

________________________________________________________________________________________

giac [A]  time = 1.17, size = 5, normalized size = 0.19 \begin {gather*} \frac {1}{3} \, x^{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(b*x+a)^n/((-b*x-a)^n),x, algorithm="giac")

[Out]

1/3*x^3

________________________________________________________________________________________

maple [A]  time = 0.00, size = 25, normalized size = 0.96 \begin {gather*} \frac {x^{3} \left (-b x -a \right )^{-n} \left (b x +a \right )^{n}}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(b*x+a)^n/((-b*x-a)^n),x)

[Out]

1/3*x^3*(b*x+a)^n/((-b*x-a)^n)

________________________________________________________________________________________

maxima [A]  time = 0.82, size = 8, normalized size = 0.31 \begin {gather*} \frac {1}{3} \, \left (-1\right )^{n} x^{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(b*x+a)^n/((-b*x-a)^n),x, algorithm="maxima")

[Out]

1/3*(-1)^n*x^3

________________________________________________________________________________________

mupad [B]  time = 1.02, size = 24, normalized size = 0.92 \begin {gather*} \frac {x^3\,{\left (a+b\,x\right )}^n}{3\,{\left (-a-b\,x\right )}^n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(a + b*x)^n)/(- a - b*x)^n,x)

[Out]

(x^3*(a + b*x)^n)/(3*(- a - b*x)^n)

________________________________________________________________________________________

sympy [A]  time = 17.40, size = 19, normalized size = 0.73 \begin {gather*} \frac {x^{3} \left (- a - b x\right )^{- n} \left (a + b x\right )^{n}}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(b*x+a)**n/((-b*x-a)**n),x)

[Out]

x**3*(-a - b*x)**(-n)*(a + b*x)**n/3

________________________________________________________________________________________